<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>关注的商铺</title>
<jsp:include page="header.jsp"></jsp:include>
<script type="text/javascript">
			$(function(){
				$('.mem-sel input').click(function(){
					$('.mem-sel input').prop('checked',$(this).prop('checked'));
					$('.mem-all-dian input').prop('checked',$(this).prop('checked'));
				});
				$('.mem-all-dian input').click(function(){
					$('.mem-sel input').prop('checked',isAllSelected());
				});
				function isAllSelected(){
					var n = $('.mem-all-dian input').length-1;
					var m=0;
					$('.mem-all-dian input').each(function(index){
						if(!$(this).prop('checked')){return false;}
						m = index;
					});
					return m==n?true:false;
				}
			});
</script>
</head>
<body>
 <div class="J-header"></div>
     <div class="wrap">
      	<div class="w member">
      	<div class="breadNavBg">
        <div class="breadNav pb10">
            <div><a>首页</a>&nbsp;&gt;&nbsp;</div><a href="ShowOrderServlet">会员中心</a>&nbsp;&gt;&nbsp;<span>我关注的店铺</span>
        </div>
    </div><!--breadNavBg-->
    
     <div class="fl leftmenu">
          <h3 class="font14"><i class="arr"></i><b>会员中心</b><span>Member Center</span></h3>
          <ul>
               <li class="title">采购中心</li>
               <li><a href="ShowOrderServlet">我的采购单</a></li>
               <li><a href="ShowMyOrderServlet">取消我的采购单</a></li>
          </ul>
          <ul>
               <li class="title">代理中心</li>
               <li><a href="member-agent-new.jsp">我的申请</a></li>
               <li><a href="member-agent.jsp">我的代理</a></li>
          </ul>
          <ul>
			   <li class="title">关注中心</li>
			   <li><a href="ShowAttentionServlet">我关注的商品</a></li>
			   <li class="active"><a href="ShowShopServlet">我关注的店铺</a></li>
		  </ul>
          <ul>
               <li class="title">设置中心</li>
                 <li><a href="AccountServlet">账户信息</a></li>
                 <li><a href="AddressQueryServlet">收货地址</a></li>
                 <li><a href="member-setting-safe.jsp">账号安全</a></li>
          </ul>
       </div><!--leftmenu end-->
        <!-- 右侧内容 -->
        <div class="fr mem-con">
        	<h2>我关注的店铺</h2>
        	<div class="mem-sel">
        		<div class="sel-all">
        			<input type="checkbox" name="" id="" value="" />全选
        		</div>
        		<div class="add-can">
        			<a href="">取消关注</a>
        		</div>
        		<div class="pagin">
        			<span><a href="javascript:;"><</a></span>
        			<span><i>1</i>/20</span>
        			<span><a href="javascript:;">></a></span>
        		</div>
        </div>
       	<div class="lineH"></div>
       	<div class="mem-all-dian">
       		<ul>
	       		<c:choose>
	       			<c:when test="${empty shop }">
	       				没有关注的店铺
	       			</c:when>
	       			<c:otherwise>
	       				<c:forEach items="${shop.data }" var="s">
	        				<li>
		        			<div class="mem-img"><a href="ShowGoodsServlet?sid=${s.sid }"><img class="img" src="${s.spic}"/></a><div class="mem-img-check"><input type="checkbox" /></div></div>
		        			<a href="ShowGoodsServlet?sid=${s.sid }" class="add-dian">进入店铺</a>
		        			<div class="dui-fal"><a class="fl" href="#">对比</a><a class="fr" href="#">取消</a></div>
		        			</li>
	       				</c:forEach>
	       			</c:otherwise>
	       		</c:choose>
        	</ul>
       	<div class="clearfix"></div>
       	</div>
       	<div class="clearfix"></div>
       	<div class="mem-sel">
       		<div class="sel-all">
       			<input type="checkbox" name="" id="" value="" />全选
       		</div>
       		<div class="add-can">
       			<a href="#">加入购物车</a>|
       			<a href="">取消关注</a>
       		</div>
       		<div class="m-page">
       			<ul>
       				<li><a class="no-page">上一页</a></li>
       				<li class="active">1</li>
       				<li><a href="#">2</a></li>
       				<li><a href="#">3</a></li>
       				<li><a href="#">4</a></li>
       				<li>···</li>
       				<li><a href="#">下一页</a></li>
       				<li>共20页</li>
       			</ul>
       		</div>
       	</div>
       </div>
       <div class="clearfix"></div>
         	</div>
	
      </div>
	           
      <iframe src="footer.jsp" frameborder="0" width="100%" height="462" scrolling="no"></iframe>
</body>
</html>